<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 基础内容结构 */
    * {
      margin: 0;
      padding: 0;
    }
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }
    .login {
      width: 350px;
      height: 400px;
      background: url('./飞书登录页.png') no-repeat center;
      background-size: contain;
    }

    /* 准备遮罩 */
    .loading-box {
      position: fixed;
      width: 100%;
      height: 100%;
      left: 0;
      top: 0;
      background-color: #fff;
      z-index: 999;
    }
    .hide {
      display: none;
    }

    /* 添加 loading 元素 */
    .loading {
      width: 100px;
      height: 100px;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background: url("./飞书小球.svg") no-repeat;
      background-size: cover;
      background-position: 0% center;
      z-index: 999;
      animation: animate 2s steps(24) infinite;
    }
    @keyframes animate {
      0% {
        background-position: 0 center;
      }

      100% {
        background-position: 100% center;
      }
    }
  </style>
</head>

<body>

  <div class="loading-box">
    <div class="loading"></div>
  </div>
  <div class="login"></div>

  <script>
    const loadingBox = document.querySelector('.loading-box')
    setTimeout(() => {
      loadingBox.classList.add('hide')
    }, 4000);
  </script>
</body>

</html>